package edu.neumont.csc380.prime.service;

import java.util.ArrayList;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlElement;

import org.codehaus.jackson.annotate.JsonProperty;
import org.codehaus.jackson.annotate.JsonPropertyOrder;


public class Witnesses {
	private ArrayList<Integer> witnesses;
	
	public Witnesses(){
		witnesses = new ArrayList<Integer>();
	}
	public Witnesses(int[] witnesses){
		this.witnesses = new ArrayList<Integer>();
		for(int w: witnesses)
			this.witnesses.add(w);
	}
	
	public ArrayList<Integer> getWitnesses() {
		return witnesses;
	}
	public void setWitnesses(ArrayList<Integer> witnesses) {
		this.witnesses = witnesses;
	}
	public void addWitness(Integer witness){
		witnesses.add(witness);
	}
	@Override
	public String toString(){
		String s = "";
		for(Integer w : witnesses)
			s+= w+",";
		s=s.substring(0,s.length()-1);
		return s;
	}
}
